Within the context of a deep-framebuffer based preview renderer, it is sometimes necessary to translate shader code written in one shading language to another shading language that will run on programmable graphics hardware (GPUs). For example, when translating shader code written in RenderMan Shading Language (RSL) to a language that runs on GPUs, such as Cg, an issue that can arise is that the Cg language has limited support for the string data type in comparison to RSL. This issue is compounded when one considers the different uses of strings in RSL shaders, such as for naming coordinate systems, for referring to textures, for comparisons and for assignments.